<div class="grid_12">
    <a href="<?php echo site_url('admin/user/add') ?>" class="checker" style="padding:3px 6px;margin-bottom: 7px">Thêm User</a>
    <div id="demo" class="clearfix">
        <table class="display" id="dataTable"> 
            <thead> 
                <tr> 
                    <th>Tên tài khoản</th> 
                    <th>Email</th> 
                    <th>Tên người dùng</th> 
                    <th>Trạng thái</th> 
                    <th>Action</th> 
                </tr> 
            </thead>
            <tbody>
                <?php foreach($user as $u): ?>
                    <tr class="<?php echo ($u['status'] == 1) ? 'gradeA' : 'gradeX' ?>"> 
                        <td class="center"><?php echo $u['acc'] ?></td> 
                        <td class="center"><?php echo $u['email'] ?></td>
                        <td class="center"><?php echo $u['name'] ?></td>
                        <td class="center">
                            <?php 
                                switch ($u['status']) {
                                    case 0 : 
                                        echo 'Khóa';
                                        break;
                                    case 1 :
                                        echo 'Mở';
                                        break;
                                }
                            ?>
                        </td> 
                        <td class="center">
                            <a href="<?php echo site_url('admin/user/edit/' . $u['id']) ?>"><img src ="<?php echo STATIC_DOMAIN?>/images/simsodep/edit.png" alt="edit" title="Sửa"></a> 
                            -
                            <?php if($u['status'] == 1): ?>
                            <a id="icon_hide" href="<?php echo site_url('admin/user/Banned/'. $u['id']) ?>"><img src ="<?php echo STATIC_DOMAIN?>/images/simsodep/lock.png" width="22" height="22" alt="hide" title="khóa"></a>
                            <?php else: ?>
                            <a id="icon_show" href="<?php echo site_url('admin/user/unBanned/'. $u['id']) ?>"><img src ="<?php echo STATIC_DOMAIN?>/images/simsodep/unlock.png" width="22" height="22" alt="hide" title="mở"></a> 
                            <?php endif; ?>
                            - 
                            <a href="<?php echo site_url('admin/user/delete/'. $u['id']) ?>"><img src ="<?php echo STATIC_DOMAIN?>/images/simsodep/delete.png" alt="delete" title="Xóa"></a>
                        </td>
                    </tr>
                <?php endforeach; ?>
            </tbody>
        </table>
    </div>
</div>